package com.javaweb.entity;

import java.io.Serializable;
import java.util.Objects;

public class Teacher implements Serializable {
    private int id ;
    private String name ;
    private String gender ;
    private String desc ;
    private int vote ;
    private String imgURL ;
    private int favNum;
    private int unfavNum ;

    public int getFavNum() {
        return favNum;
    }

    public void setFavNum(int favNum) {
        this.favNum = favNum;
    }

    public int getUnfavNum() {
        return unfavNum;
    }

    public void setUnfavNum(int unfavNum) {
        this.unfavNum = unfavNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Teacher)) return false;
        Teacher teacher = (Teacher) o;
        return vote == teacher.vote &&
                name.equals(teacher.name) &&
                gender.equals(teacher.gender) &&
                desc.equals(teacher.desc) &&
                imgURL.equals(teacher.imgURL);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, gender, desc, vote, imgURL);
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "id=" + id +
                "name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", desc='" + desc + '\'' +
                ", vote=" + vote +
                ", imgURL='" + imgURL + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public void setVote(int vote) {
        this.vote = vote;
    }

    public void setImgURL(String imgURL) {
        this.imgURL = imgURL;
    }

    public String getName() {
        return name;
    }

    public String getGender() {
        return gender;
    }

    public String getDesc() {
        return desc;
    }

    public int getVote() {
        return vote;
    }

    public String getImgURL() {
        return imgURL;
    }
}
